package Model;

/**
 * One seat in space and time; tied to venue timeslot and only makes sense as a part of that time slot (composition).
 * @author Yury Kitaev
 *
 */
public class Seat 
{
	private boolean taken;
	private int number;
	private VenueTimeslot venue;
	
	/** 
	 * Constructor
	 * @param taken True if the seat is reserved, false if it's available
	 * @param number The seat number
	 */
	public Seat(boolean taken, int number, VenueTimeslot venue) 
	{
		super();
		this.taken = taken;
		this.number = number;
		this.venue = venue;
	}

	/**
	 * Tells if the seat is taken or not
	 * @return True if taken, false otherwise 
	 */
	public boolean isTaken() 
	{
		return taken;
	}

	/**
	 * Sets the seat as occupied
	 * @param taken True to set occupied, false to set vacant.
	 */
	public void setTaken(boolean taken) 
	{
		this.taken = taken;
	}

	/**
	 * Seat number, that is, the number written at the back of the seat which shall match the number on your ticket.
	 * @return the number of the seat
	 */
	public int getNumber() 
	{
		return number;
	}

	public void setNumber(int number) 
	{
		this.number = number;
	}

	public VenueTimeslot getVenue() 
	{
		return venue;
	}

	public void setVenue(VenueTimeslot venue)
	{
		this.venue = venue;
	}
}
